<?php

require './init.php';


// You need to set the client email for all campaign operations
$api->client_email = 'client_1+adwords-api-usage@hyperactive.ro';

$adGroup = $api->AdGroup()->newGroup();
$adGroup->campaignId = '31725';
$adGroup->name = 'Test AdGroups' . time();
$adGroup->status = 'PAUSED';
$adGroup->setBids('ManualCPC');
$adGroup->bids->keywordMaxCpc->setAmount('1000000', 'USD') ;
echo htmlentities($adGroup);
$adGroup = $api->AdGroup()->addNew($adGroup);
var_dump($adGroup);

// Getting all AdGroup
$adsPage = $api->AdGroup()->getAll();
var_dump($adsPage->getEntries());